#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>


 struct ListNode {
 	int val;
    struct ListNode *next;
 };
struct ListNode* FindKthToTail(struct ListNode* pListHead, int k) {
    // write code here
    struct ListNode* fast = pListHead, * slow = pListHead;
    while (k--)
    {
        if (fast == NULL)
            return NULL;
        fast = fast->next;

    }

    while (fast)
    {
        slow = slow->next;
        fast = fast->next;
    }
    return slow;
}